﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Weber.CS3280.Inventory.Enums;
using Weber.CS3280.Inventory.Logic;

namespace Inventory.Shell
{
	class Program
	{
		static void Main(string[] args)
		{
			//CreateSampleFile();
			EditItem();

			Console.WriteLine("Hello World");
			string fromUser = Console.ReadLine();
		}

		public static void CreateSampleFile()
		{
			InventoryItemsListController itemsController = 
				new InventoryItemsListController();

			InventoryItemController item = new InventoryItemController();

			item.ItemCode = 21;
			item.Name = "Basic H Cleaner";
			item.RetailPrice = 9.95m;
			item.Cost = 7.65m;
			item.Category = ItemCategory.Cleaning;
			itemsController.AddItem(item);

			if (itemsController.IsDirty)
				itemsController.Save();
		}

		public static void EditItem()
		{
			InventoryItemsListController itemsController =
				new InventoryItemsListController();

			InventoryItemController item = itemsController.GetItem(21);
			

			//item.ItemCode = 21;
			item.Name = "Basic H Cleaner";
			item.RetailPrice = 10.95m;

			if (itemsController.IsDirty)
				itemsController.Save();
		}

	}
}
